package org.byqh.dqeai.entity.proxy;

import com.easy.query.core.expression.parser.core.available.TableAvailable;
import com.easy.query.core.proxy.AbstractProxyEntity;
import com.easy.query.core.proxy.SQLColumn;
import com.easy.query.core.proxy.SQLSelectAsExpression;
import com.easy.query.core.proxy.fetcher.AbstractFetcher;
import com.easy.query.core.proxy.core.EntitySQLContext;
import org.byqh.dqeai.entity.EaiSysRoleRelation;
import com.easy.query.core.proxy.columns.types.SQLStringTypeColumn;

/**
 * this file automatically generated by easy-query, don't modify it
 * 当前文件是easy-query自动生成的请不要随意修改
 * 如果出现属性冲突请使用@ProxyProperty进行重命名
 *
 * @author easy-query
 */
public class EaiSysRoleRelationProxy extends AbstractProxyEntity<EaiSysRoleRelationProxy, EaiSysRoleRelation> {

    private static final Class<EaiSysRoleRelation> entityClass = EaiSysRoleRelation.class;

    public static final EaiSysRoleRelationProxy TABLE = createTable().createEmpty();

    public static EaiSysRoleRelationProxy createTable() {
        return new EaiSysRoleRelationProxy();
    }

    public EaiSysRoleRelationProxy() {
    }

    /**
     * {@link EaiSysRoleRelation#getRoleId}
     */
    public SQLStringTypeColumn<EaiSysRoleRelationProxy> roleId() {
        return getStringTypeColumn("roleId");
    }

    /**
     * {@link EaiSysRoleRelation#getRelationId}
     */
    public SQLStringTypeColumn<EaiSysRoleRelationProxy> relationId() {
        return getStringTypeColumn("relationId");
    }

    /**
     * {@link EaiSysRoleRelation#getRelationType}
     */
    public SQLStringTypeColumn<EaiSysRoleRelationProxy> relationType() {
        return getStringTypeColumn("relationType");
    }

    @Override
    public Class<EaiSysRoleRelation> getEntityClass() {
        return entityClass;
    }

    /**
     * 数据库列的简单获取
     *
     * @return
     */
    public EaiSysRoleRelationProxyFetcher FETCHER = new EaiSysRoleRelationProxyFetcher(this, null, SQLSelectAsExpression.empty);

    public static class EaiSysRoleRelationProxyFetcher extends AbstractFetcher<EaiSysRoleRelationProxy, EaiSysRoleRelation, EaiSysRoleRelationProxyFetcher> {

        public EaiSysRoleRelationProxyFetcher(EaiSysRoleRelationProxy proxy, EaiSysRoleRelationProxyFetcher prev, SQLSelectAsExpression sqlSelectAsExpression) {
            super(proxy, prev, sqlSelectAsExpression);
        }

        /**
         * {@link EaiSysRoleRelation#getRoleId}
         */
        public EaiSysRoleRelationProxyFetcher roleId() {
            return add(getProxy().roleId());
        }

        /**
         * {@link EaiSysRoleRelation#getRelationId}
         */
        public EaiSysRoleRelationProxyFetcher relationId() {
            return add(getProxy().relationId());
        }

        /**
         * {@link EaiSysRoleRelation#getRelationType}
         */
        public EaiSysRoleRelationProxyFetcher relationType() {
            return add(getProxy().relationType());
        }

        @Override
        protected EaiSysRoleRelationProxyFetcher createFetcher(EaiSysRoleRelationProxy cp, AbstractFetcher<EaiSysRoleRelationProxy, EaiSysRoleRelation, EaiSysRoleRelationProxyFetcher> prev, SQLSelectAsExpression sqlSelectExpression) {
            return new EaiSysRoleRelationProxyFetcher(cp, this, sqlSelectExpression);
        }
    }
}
